#ifndef RIVIAIMAGE_H
#define RIVIAIMAGE_H

#include <QHash>
#include "opencv2/core.hpp"

class QImage;
class RIVIALayer;

class RIVIAImage
{
public:
    RIVIAImage(const cv::Mat &Mat);
    virtual ~RIVIAImage();

public:
    QImage getDisplayQImage();
    cv::Mat getAllMats();

    RIVIALayer* newLayer(const cv::Mat &Mat);
    RIVIALayer* getCurLayer();
    void deleteCurLayer();

    void setCurLayerID(int nLayerID);

private:
    void genAllMats();

private:
    int m_nCurLayerID;

    cv::Mat m_AllMats;

    int m_nMaxLayerID;
    QHash<int, RIVIALayer*>* m_pLayersHash;
};

#endif // RIVIAIMAGE_H
